package m.html.element;

import m.html.element.other.InputElement;
import m.system.exception.MException;
import m.system.util.ObjectUtil;

public class CheckBox extends InputElement {
    public CheckBox(String field,Object value) {
        super("a-checkbox");
        this.A("v-model:checked",field);
        try {
            this.A("value", ObjectUtil.toString(value));
            viewElement=Element.tag("a-checkbox").A("checked",ObjectUtil.toString(value));
        } catch (MException e) {
            throw new RuntimeException(e);
        }
    }
    public CheckBox(String field){
        this(field,true);
    }

}
